<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>书籍列表</title>
  <style>
    table {
      width: 100%;
      border-collapse: collapse;
    }
    table,th, td {
      border: 1px solid black;
    }
    th, td {
      padding: 8px;
      text-align: left;
    }
    th{
      background-color: #f2f2f2;
    }
  </style>
</head>

<body>
<h1>书籍列表</h1>
<table>
  <thead>
  <tr>
    <th>Id</th>
    <th>类型</th>
    <th>书名</th>
    <th>描述</th>
  </tr>
  </thead>
  <tbody>
  <tr th:each="book : ${books}">
    <td th:text="${book.id}"></td>
    <td th:text="${book.type}"></td>
    <td th:text="${book.name}"></td>
    <td th:text="${book.description}"></td>
  </tr>
  </tbody>
</table>
</body>
</html>